﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;
using EasySite.Web;
using NUnit.Framework;

namespace EasySite.Tests
{
    [TestFixture]
    public class UnitTestBase
    {
        public T GetService<T>()
        {
            return DependencyResolver.Current.GetService<T>();
        }

        [TestFixtureSetUp]
        public void Init()
        {
            EasySiteContext.Current.Initialize();
        }

        [TestFixtureTearDown]
        public void Dispose()
        {
            EasySiteContext.Current.Dispose();
        }
    }
}
